{{define "main"}}
{{template "header" .}}
  <div class="container">
  <nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">
        <svg class="svg-logo">
        <use xlink:href="assets/svg/sprites.svg#svg-decred-logo" />
        </svg>
      </a>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
  {{if .Admin}}<li {{if .IsAdminTickets}}class="active"{{end}}><a href="/admintickets">Add Low Fee Tickets</a></li>{{end}}
  {{if .Admin}}<li {{if .IsAdminStatus}}class="active"{{end}}><a href="/status">Status</a></li>{{end}}  
	<li {{if .IsIndex }}class="active"{{end}}><a href="/">Home</a></li>
	<li {{if .IsStats }}class="active"{{end}}><a href="/stats">Stats</a></li>
	{{if .User}}<li {{if .IsAddress }}class="active"{{end}}><a href="/address">Address</a></li>{{end}}
  {{if .User}}<li {{if .IsSettings }}class="active"{{end}}><a href="/settings">Settings</a></li>{{end}}
	{{if .User}}{{if .User.MultiSigAddress}}<li {{if .IsTickets }}class="active"{{end}}><a href="/tickets">Tickets</a></li>{{end}}{{end}}
  {{if .User}}{{if .User.MultiSigAddress}}<li {{if .IsVoting }}class="active"{{end}}><a href="/voting">Voting</a></li>{{end}}{{end}}
      </ul>
{{if .User}}
      <ul class="nav navbar-nav navbar-right">
	<li>
	<p class="navbar-text">
	Hello, {{ .User.Email}}
	</p>
	</li>
	<li><a href="/logout">Logout</a></li>
      </ul>
{{else}}
      <ul class="nav navbar-nav navbar-right">
	{{if .IsEmailUpdate }}<li><a href="/emailupdate">Email Update</a></li>{{end}}
	{{if .IsEmailVerify }}<li><a href="/emailverify">Email Verification</a></li>{{end}}
	{{if .IsPasswordReset }}<li><a href="/passwordreset">Password Reset</a></li>{{end}}
	{{if .IsPasswordUpdate }}<li><a href="/passwordupdate">Password Update</a></li>{{end}}
	<li><a href="/signin">Sign In</a></li>
	<li><a href="/signup">Sign Up</a></li>
      </ul>
{{end}}	
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
{{.Content}}
{{template "footer" .}}
{{end}}

